/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import java.math.BigInteger;
import models.PageBO;
import myconfession.dao.PageDAO;
import myconfession.dto.page.Page;

/**
 *
 * @author Liem
 */

public class EditPageAction {
    private String pageId;
    private String pagename;
    private String description;
    private String fbPageId;
    private String imageLink;
    private String hashtag;
    

    public EditPageAction() {
    }

    public String execute() throws Exception {
        Page page = new Page();
        page.setId(new BigInteger(pageId));
        page.setPagename(pagename);
        page.setDescription(description);
        page.setImageLink(imageLink);
        page.setFbPageId(fbPageId);
        page.setHashtag(hashtag);

        PageBO.updatePage(page);
        
        return "success";
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getFbPageId() {
        return fbPageId;
    }

    public void setFbPageId(String fbPageId) {
        this.fbPageId = fbPageId;
    }

    public String getImageLink() {
        return imageLink;
    }

    public void setImageLink(String imageLink) {
        this.imageLink = imageLink;
    }

    public String getPageId() {
        return pageId;
    }

    public void setPageId(String pageId) {
        this.pageId = pageId;
    }

    public String getPagename() {
        return pagename;
    }

    public void setPagename(String pagename) {
        this.pagename = pagename;
    }

    public String getHashtag() {
        return hashtag;
    }

    public void setHashtag(String hashtag) {
        this.hashtag = hashtag;
    }

}